package com.yesin.item.mapper;

import com.yesin.item.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.idlist.SelectByIdListMapper;
import tk.mybatis.mapper.common.Mapper;

public interface CategoryMapper extends Mapper<Category>, SelectByIdListMapper<Category,Long> {
    @Select("select c.* from tb_category as c left join tb_category_brand as cb on c.id=cb.category_id where cb.brand_id=#{bid}")
    Category selectCategoryBybid(@Param("bid")Long bid);
}
